const user = require('../data/user');
module.exports = async (req, res, next) => {
  const tel = req.query.userTel
  const nickName = req.query.nickName
  console.log(tel)
  console.log(nickName)
  const data = await user.updateOne({ tel: tel }, {nickName});
  if (data === nickName) {
    res,send({
      code:1,
      msg:'用户名修改成功'
    })
  }else{
    res.send({
      code:0,
      msg:'用户名修改失败'
    })
  }
}